home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 2 / Gold Medal Software Volume 2 (Gold Medal) (1994).iso / prog / adlip.arj / CSOUND.ASM < prev    next >
Assembly Source File  |  1988-04-21  |  1KB  |  75 lines

  1. ;    CSOUND.ASM
  2. ;
  3. ; interface to resident sound-driver for LATTICE C compiler, LARGE model.
  4. ;
  5. ; 87/03/18 Ad Lib.
  6. ; 88/04/21 Ad Lib Inc.
  7. ;
  8.     INCLUDE DOS.MAC            ; memory models ...
  9.     INCLUDE DEFS.MAC        ; equates & sound-driver version proc.
  10.  
  11.  
  12.  
  13.     PSEG
  14.  
  15.     INCLUDE VERSION.MAC        ; sound-driver signature
  16.  
  17.     public    GetSoundDrvVersion
  18.  
  19.  
  20. ;
  21. ;    unsigned GetSoundDrvVersion()
  22. ;        if the sound-driver is charged in memory, return his
  23. ;        version number, else 0.
  24. ;
  25.     DrvVersionProc GetSoundDrvVersion
  26.  
  27.  
  28.  
  29.  
  30. ;    int SoundCall( functionNumber, arg_list)
  31. ;        int functionNumer;
  32. ;        any... arg_list
  33. ;
  34. ;    Generate interrupt to sound-driver with parameter's address
  35. ;    in ES:BX and function number in SI
  36. ;
  37. ;     Only registers AX, BX, CX & DX are lost.
  38.  
  39. BEGIN SoundCall
  40.  
  41. sframe    STRUC
  42.         dw    ?        ; old SI ( if using optimizing compiler ... )
  43.         dw    ?        ; old DI
  44.         dw    ?        ; old ES
  45.         dw    ?        ; old BP
  46.         db    CPSIZE DUP (?)    ; return addr
  47. args        dw    ?
  48. others        dw    ?        ; other arguments, if any
  49. sframe    ENDS    
  50.  
  51.     push    bp
  52.     push    es
  53.     push    di
  54.     push    si
  55.  
  56.     mov    bp, sp
  57.     mov    si, [ bp].args        ; get function number
  58.     lea    bx, [ bp].others    ; get pointers to other args...
  59.     push    ss
  60.     pop    es
  61.     int    sound_driver_int    ; call sound-driver ... return in AL, if any
  62.  
  63.     pop    si
  64.     pop    di
  65.     pop    es
  66.     pop    bp
  67.     ret
  68. SoundCall    ENDP
  69.  
  70.  
  71.     ENDPS
  72.     end
  73.  
  74.